package org.kim.pojo;

import java.io.Serializable;

public class Account implements Serializable {

    private static final long serialVersionUID = 1L;

    private String accountId;
    private String role;
    private String name;
    private String password;
    private String status;

    public Account() {
    }

    public Account(String id, String role, String name, String password, String status) {
        this.accountId = id;
        this.role = role;
        this.name = name;
        this.password = password;
        this.status = status;
    }

    public String getAccountId() {
        return accountId;
    }

    public void setAccountId(String accountId) {
        this.accountId = accountId;
    }

    public String getRole() {
        return role;
    }

    public void setRole(String role) {
        this.role = role;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public String getStatus() {
        return status;
    }

    public void setStatus(String status) {
        this.status = status;
    }

    @Override
    public int hashCode() {
        return this.getAccountId().hashCode();
    }

    @Override
    public boolean equals(Object obj) {
        if (obj == null || this.getClass() != obj.getClass()) {
            return false;
        }
        if (this == obj) {
            return true;
        }
        Account temp = (Account) obj;
        if (temp.getAccountId().equals(this.getAccountId())
                && temp.getName().equals(this.getName())
                && temp.getRole().equals(this.getRole())) {
            return true;
        }
        return false;
    }

    @Override
    public String toString() {
        return "Account{" +
                "accountId='" + accountId + '\'' +
                ", role='" + role + '\'' +
                ", name='" + name + '\'' +
                ", status='" + status + '\'' +
                '}';
    }
}
